package com.xysl.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 菜单对象 zl_menu
 *
 * @author xysl
 * @date 2025-01-11
 */
@Schema(description = "app菜单对象")
@Data
public class XyslMenu
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Schema(description = "菜单名称")
    private String menuName;

    @Schema(description = "菜单图标")
    private String menuImg;

    @Schema(description = "菜单链接地址")
    private String menuUrl;

    @Schema(description = "菜单顺序")
    private Long menuSort;

    @Schema(description = "菜单类别（1-一级菜单，2-二级菜单，3-三级菜单）")
    private Long menuType;

    @Schema(description = "上级菜单id（一级菜单时为0）")
    private Long parentId;

    @Schema(description = "描述")
    private String menuDesc;

    @Schema(description = "权限码")
    private String permissionCode;

    @Schema(description = "0-正常;1-关闭")
    private String status;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedAt;

    @Schema(description = "子菜单")
    private List<XyslMenu> children = new ArrayList<>();
}
